package com.cskaoyan.model.vo;

import com.cskaoyan.model.Comment;
import com.cskaoyan.model.Goods;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @program: mall38
 * @description:
 * @author: Wang
 * @create: 2022-05-05 20:02
 **/

@NoArgsConstructor
@Data
public class CommentDataVO {
    private Integer total; //总的数据量，没有分页的情况下的数据量
    private Integer pages; //总的页码数
    private Integer limit; //当前页最多的数据量
    private Integer page; //当前页的页码
    private List<Comment> list; //当前页的数据
    //alt + s

    public static CommentDataVO data(long total, Integer pages, Integer limit, Integer page, List list) {
        CommentDataVO GoodsDataVO = new CommentDataVO();
        GoodsDataVO.setTotal((int) total);
        GoodsDataVO.setPages(pages);
        GoodsDataVO.setPage(page);
        GoodsDataVO.setLimit(limit);
        GoodsDataVO.setList(list);
        return GoodsDataVO;
    }
}
